<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module mpyc.sectypes</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head><body bgcolor="#f0f0f8">

<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong><a href="mpyc.html"><font color="#ffffff">mpyc</font></a>.sectypes</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="https://github.com/lschoe/mpyc/blob/v0.6/mpyc/sectypes.py">github.com/lschoe/mpyc/blob/v0.6/mpyc/sectypes.py</a></font></td></tr></table>
    <p><tt>This&nbsp;module&nbsp;collects&nbsp;the&nbsp;secure&nbsp;(secret-shared)&nbsp;types&nbsp;for&nbsp;MPyC.<br>
&nbsp;<br>
Secure&nbsp;(secret-shared)&nbsp;number&nbsp;types&nbsp;all&nbsp;use&nbsp;a&nbsp;common&nbsp;base&nbsp;class,&nbsp;which<br>
ensures&nbsp;that&nbsp;operators&nbsp;such&nbsp;as&nbsp;+,&nbsp;*,&nbsp;&gt;=&nbsp;are&nbsp;defined&nbsp;by&nbsp;operator&nbsp;overloading.</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
    
<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="https://docs.python.org/3/library/asyncio.html">asyncio</a><br>
<a href="mpyc.finfields.html">mpyc.finfields</a><br>
</td><td width="25%" valign=top><a href="https://docs.python.org/3/library/functools.html">functools</a><br>
<a href="mpyc.gfpx.html">mpyc.gfpx</a><br>
</td><td width="25%" valign=top><a href="mpyc.gmpy.html">mpyc.gmpy</a><br>
<a href="https://docs.python.org/3/library/math.html">math</a><br>
</td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
    
<tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="https://docs.python.org/3/library/functions.html#object">builtins.object</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="mpyc.sectypes.html#Share">Share</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="mpyc.sectypes.html#SecureFiniteField">SecureFiniteField</a>
</font></dt><dt><font face="helvetica, arial"><a href="mpyc.sectypes.html#SecureFixedPoint">SecureFixedPoint</a>
</font></dt><dt><font face="helvetica, arial"><a href="mpyc.sectypes.html#SecureInteger">SecureInteger</a>
</font></dt></dl>
</dd>
</dl>
</dd>
</dl>
 <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="SecureFiniteField">class <strong>SecureFiniteField</strong></a>(<a href="mpyc.sectypes.html#Share">Share</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt><a href="#SecureFiniteField">SecureFiniteField</a>(value=None)<br>
&nbsp;<br>
Base&nbsp;class&nbsp;for&nbsp;secret-shared&nbsp;finite&nbsp;field&nbsp;values.<br>
&nbsp;<br>
NB:&nbsp;bit-oriented&nbsp;operations&nbsp;will&nbsp;be&nbsp;supported&nbsp;for&nbsp;prime&nbsp;fields.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="mpyc.sectypes.html#SecureFiniteField">SecureFiniteField</a></dd>
<dd><a href="mpyc.sectypes.html#Share">Share</a></dd>
<dd><a href="https://docs.python.org/3/library/functions.html#object">builtins.object</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="SecureFiniteField-__abs__"><strong>__abs__</strong></a>(self)</dt><dd><tt>Currently&nbsp;no&nbsp;support&nbsp;at&nbsp;all.</tt></dd></dl>

<dl><dt><a name="SecureFiniteField-__and__"><strong>__and__</strong></a>(self, other)</dt><dd><tt>Bitwise&nbsp;and&nbsp;for&nbsp;binary&nbsp;fields&nbsp;(otherwise&nbsp;1-bit&nbsp;only).</tt></dd></dl>

<dl><dt><a name="SecureFiniteField-__divmod__"><strong>__divmod__</strong></a>(self, other)</dt><dd><tt>Currently&nbsp;no&nbsp;support&nbsp;at&nbsp;all.</tt></dd></dl>

<dl><dt><a name="SecureFiniteField-__floordiv__"><strong>__floordiv__</strong></a>(self, other)</dt><dd><tt>Currently&nbsp;no&nbsp;support&nbsp;at&nbsp;all.</tt></dd></dl>

<dl><dt><a name="SecureFiniteField-__ge__"><strong>__ge__</strong></a>(self, other)</dt><dd><tt>Currently&nbsp;no&nbsp;support&nbsp;at&nbsp;all.</tt></dd></dl>

<dl><dt><a name="SecureFiniteField-__gt__"><strong>__gt__</strong></a>(self, other)</dt><dd><tt>Currently&nbsp;no&nbsp;support&nbsp;at&nbsp;all.</tt></dd></dl>

<dl><dt><a name="SecureFiniteField-__invert__"><strong>__invert__</strong></a>(self)</dt><dd><tt>Bitwise&nbsp;not&nbsp;(inversion)&nbsp;for&nbsp;binary&nbsp;fields&nbsp;(otherwise&nbsp;1-bit&nbsp;only).</tt></dd></dl>

<dl><dt><a name="SecureFiniteField-__le__"><strong>__le__</strong></a>(self, other)</dt><dd><tt>Currently&nbsp;no&nbsp;support&nbsp;at&nbsp;all.</tt></dd></dl>

<dl><dt><a name="SecureFiniteField-__lshift__"><strong>__lshift__</strong></a>(self, other)</dt><dd><tt>Currently&nbsp;no&nbsp;support&nbsp;at&nbsp;all.</tt></dd></dl>

<dl><dt><a name="SecureFiniteField-__lt__"><strong>__lt__</strong></a>(self, other)</dt><dd><tt>Currently&nbsp;no&nbsp;support&nbsp;at&nbsp;all.</tt></dd></dl>

<dl><dt><a name="SecureFiniteField-__mod__"><strong>__mod__</strong></a>(self, other)</dt><dd><tt>Currently&nbsp;no&nbsp;support&nbsp;at&nbsp;all.</tt></dd></dl>

<dl><dt><a name="SecureFiniteField-__or__"><strong>__or__</strong></a>(self, other)</dt><dd><tt>Bitwise&nbsp;or&nbsp;for&nbsp;binary&nbsp;fields&nbsp;(otherwise&nbsp;1-bit&nbsp;only).</tt></dd></dl>

<dl><dt><a name="SecureFiniteField-__rdivmod__"><strong>__rdivmod__</strong></a>(self, other)</dt><dd><tt>Currently&nbsp;no&nbsp;support&nbsp;at&nbsp;all.</tt></dd></dl>

<dl><dt><a name="SecureFiniteField-__rfloordiv__"><strong>__rfloordiv__</strong></a>(self, other)</dt><dd><tt>Currently&nbsp;no&nbsp;support&nbsp;at&nbsp;all.</tt></dd></dl>

<dl><dt><a name="SecureFiniteField-__rlshift__"><strong>__rlshift__</strong></a>(self, other)</dt><dd><tt>Currently&nbsp;no&nbsp;support&nbsp;at&nbsp;all.</tt></dd></dl>

<dl><dt><a name="SecureFiniteField-__rmod__"><strong>__rmod__</strong></a>(self, other)</dt><dd><tt>Currently&nbsp;no&nbsp;support&nbsp;at&nbsp;all.</tt></dd></dl>

<dl><dt><a name="SecureFiniteField-__rrshift__"><strong>__rrshift__</strong></a>(self, other)</dt><dd><tt>Currently&nbsp;no&nbsp;support&nbsp;at&nbsp;all.</tt></dd></dl>

<dl><dt><a name="SecureFiniteField-__rshift__"><strong>__rshift__</strong></a>(self, other)</dt><dd><tt>Currently&nbsp;no&nbsp;support&nbsp;at&nbsp;all.</tt></dd></dl>

<dl><dt><a name="SecureFiniteField-__xor__"><strong>__xor__</strong></a>(self, other)</dt><dd><tt>Bitwise&nbsp;exclusive-or&nbsp;for&nbsp;binary&nbsp;fields&nbsp;(otherwise&nbsp;1-bit&nbsp;only).</tt></dd></dl>

<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>field</strong> = None</dl>

<hr>
Methods inherited from <a href="mpyc.sectypes.html#Share">Share</a>:<br>
<dl><dt><a name="SecureFiniteField-__add__"><strong>__add__</strong></a>(self, other)</dt><dd><tt>Addition.</tt></dd></dl>

<dl><dt><a name="SecureFiniteField-__bool__"><strong>__bool__</strong></a>(self)</dt><dd><tt>Use&nbsp;of&nbsp;secret-shared&nbsp;values&nbsp;in&nbsp;Boolean&nbsp;expressions&nbsp;makes&nbsp;no&nbsp;sense.</tt></dd></dl>

<dl><dt><a name="SecureFiniteField-__eq__"><strong>__eq__</strong></a>(self, other)</dt><dd><tt>Equality&nbsp;testing.</tt></dd></dl>

<dl><dt><a name="SecureFiniteField-__init__"><strong>__init__</strong></a>(self, value=None)</dt><dd><tt>Initialize&nbsp;a&nbsp;share.</tt></dd></dl>

<dl><dt><a name="SecureFiniteField-__mul__"><strong>__mul__</strong></a>(self, other)</dt><dd><tt>Multiplication.</tt></dd></dl>

<dl><dt><a name="SecureFiniteField-__ne__"><strong>__ne__</strong></a>(self, other)</dt><dd><tt>Negated&nbsp;equality&nbsp;testing.</tt></dd></dl>

<dl><dt><a name="SecureFiniteField-__neg__"><strong>__neg__</strong></a>(self)</dt><dd><tt>Negation.</tt></dd></dl>

<dl><dt><a name="SecureFiniteField-__pos__"><strong>__pos__</strong></a>(self)</dt><dd><tt>Unary&nbsp;+.</tt></dd></dl>

<dl><dt><a name="SecureFiniteField-__pow__"><strong>__pow__</strong></a>(self, other)</dt><dd><tt>Exponentation&nbsp;for&nbsp;public&nbsp;integral&nbsp;exponent.</tt></dd></dl>

<dl><dt><a name="SecureFiniteField-__radd__"><strong>__radd__</strong></a> = <a href="#SecureFiniteField-__add__">__add__</a>(self, other)</dt></dl>

<dl><dt><a name="SecureFiniteField-__rand__"><strong>__rand__</strong></a> = __and__(self, other)</dt><dd><tt>Bitwise&nbsp;and,&nbsp;for&nbsp;now&nbsp;1-bit&nbsp;only.</tt></dd></dl>

<dl><dt><a name="SecureFiniteField-__rmul__"><strong>__rmul__</strong></a> = <a href="#SecureFiniteField-__mul__">__mul__</a>(self, other)</dt></dl>

<dl><dt><a name="SecureFiniteField-__ror__"><strong>__ror__</strong></a> = __or__(self, other)</dt><dd><tt>Bitwise&nbsp;or,&nbsp;for&nbsp;now&nbsp;1-bit&nbsp;only.</tt></dd></dl>

<dl><dt><a name="SecureFiniteField-__rsub__"><strong>__rsub__</strong></a>(self, other)</dt><dd><tt>Subtraction&nbsp;(with&nbsp;reflected&nbsp;arguments).</tt></dd></dl>

<dl><dt><a name="SecureFiniteField-__rtruediv__"><strong>__rtruediv__</strong></a>(self, other)</dt><dd><tt>Division&nbsp;(with&nbsp;reflected&nbsp;arguments).</tt></dd></dl>

<dl><dt><a name="SecureFiniteField-__rxor__"><strong>__rxor__</strong></a> = __xor__(self, other)</dt><dd><tt>Bitwise&nbsp;exclusive-or,&nbsp;for&nbsp;now&nbsp;1-bit&nbsp;only.</tt></dd></dl>

<dl><dt><a name="SecureFiniteField-__sub__"><strong>__sub__</strong></a>(self, other)</dt><dd><tt>Subtraction.</tt></dd></dl>

<dl><dt><a name="SecureFiniteField-__truediv__"><strong>__truediv__</strong></a>(self, other)</dt><dd><tt>Division.</tt></dd></dl>

<hr>
Data descriptors inherited from <a href="mpyc.sectypes.html#Share">Share</a>:<br>
<dl><dt><strong>df</strong></dt>
</dl>
<hr>
Data and other attributes inherited from <a href="mpyc.sectypes.html#Share">Share</a>:<br>
<dl><dt><strong>__hash__</strong> = None</dl>

</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="SecureFixedPoint">class <strong>SecureFixedPoint</strong></a>(<a href="mpyc.sectypes.html#Share">Share</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt><a href="#SecureFixedPoint">SecureFixedPoint</a>(value=None)<br>
&nbsp;<br>
Base&nbsp;class&nbsp;for&nbsp;secret-shared&nbsp;fixed-point&nbsp;values.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="mpyc.sectypes.html#SecureFixedPoint">SecureFixedPoint</a></dd>
<dd><a href="mpyc.sectypes.html#Share">Share</a></dd>
<dd><a href="https://docs.python.org/3/library/functions.html#object">builtins.object</a></dd>
</dl>
<hr>
Methods inherited from <a href="mpyc.sectypes.html#Share">Share</a>:<br>
<dl><dt><a name="SecureFixedPoint-__abs__"><strong>__abs__</strong></a>(self)</dt><dd><tt>Absolute&nbsp;value.</tt></dd></dl>

<dl><dt><a name="SecureFixedPoint-__add__"><strong>__add__</strong></a>(self, other)</dt><dd><tt>Addition.</tt></dd></dl>

<dl><dt><a name="SecureFixedPoint-__and__"><strong>__and__</strong></a>(self, other)</dt><dd><tt>Bitwise&nbsp;and,&nbsp;for&nbsp;now&nbsp;1-bit&nbsp;only.</tt></dd></dl>

<dl><dt><a name="SecureFixedPoint-__bool__"><strong>__bool__</strong></a>(self)</dt><dd><tt>Use&nbsp;of&nbsp;secret-shared&nbsp;values&nbsp;in&nbsp;Boolean&nbsp;expressions&nbsp;makes&nbsp;no&nbsp;sense.</tt></dd></dl>

<dl><dt><a name="SecureFixedPoint-__divmod__"><strong>__divmod__</strong></a>(self, other)</dt><dd><tt>Integer&nbsp;division&nbsp;with&nbsp;public&nbsp;divisor.</tt></dd></dl>

<dl><dt><a name="SecureFixedPoint-__eq__"><strong>__eq__</strong></a>(self, other)</dt><dd><tt>Equality&nbsp;testing.</tt></dd></dl>

<dl><dt><a name="SecureFixedPoint-__floordiv__"><strong>__floordiv__</strong></a>(self, other)</dt><dd><tt>Integer&nbsp;quotient&nbsp;with&nbsp;public&nbsp;divisor.</tt></dd></dl>

<dl><dt><a name="SecureFixedPoint-__ge__"><strong>__ge__</strong></a>(self, other)</dt><dd><tt>Greater-than&nbsp;or&nbsp;equal&nbsp;comparison.</tt></dd></dl>

<dl><dt><a name="SecureFixedPoint-__gt__"><strong>__gt__</strong></a>(self, other)</dt><dd><tt>Strictly&nbsp;greater-than&nbsp;comparison.</tt></dd></dl>

<dl><dt><a name="SecureFixedPoint-__init__"><strong>__init__</strong></a>(self, value=None)</dt><dd><tt>Initialize&nbsp;a&nbsp;share.</tt></dd></dl>

<dl><dt><a name="SecureFixedPoint-__invert__"><strong>__invert__</strong></a>(self)</dt><dd><tt>Bitwise&nbsp;not&nbsp;(inversion),&nbsp;for&nbsp;now&nbsp;1-bit&nbsp;only.</tt></dd></dl>

<dl><dt><a name="SecureFixedPoint-__le__"><strong>__le__</strong></a>(self, other)</dt><dd><tt>Less-than&nbsp;or&nbsp;equal&nbsp;comparison.</tt></dd></dl>

<dl><dt><a name="SecureFixedPoint-__lshift__"><strong>__lshift__</strong></a>(self, other)</dt><dd><tt>Left&nbsp;shift&nbsp;with&nbsp;public&nbsp;integral&nbsp;offset.</tt></dd></dl>

<dl><dt><a name="SecureFixedPoint-__lt__"><strong>__lt__</strong></a>(self, other)</dt><dd><tt>Strictly&nbsp;less-than&nbsp;comparison.</tt></dd></dl>

<dl><dt><a name="SecureFixedPoint-__mod__"><strong>__mod__</strong></a>(self, other)</dt><dd><tt>Integer&nbsp;remainder&nbsp;with&nbsp;public&nbsp;divisor.</tt></dd></dl>

<dl><dt><a name="SecureFixedPoint-__mul__"><strong>__mul__</strong></a>(self, other)</dt><dd><tt>Multiplication.</tt></dd></dl>

<dl><dt><a name="SecureFixedPoint-__ne__"><strong>__ne__</strong></a>(self, other)</dt><dd><tt>Negated&nbsp;equality&nbsp;testing.</tt></dd></dl>

<dl><dt><a name="SecureFixedPoint-__neg__"><strong>__neg__</strong></a>(self)</dt><dd><tt>Negation.</tt></dd></dl>

<dl><dt><a name="SecureFixedPoint-__or__"><strong>__or__</strong></a>(self, other)</dt><dd><tt>Bitwise&nbsp;or,&nbsp;for&nbsp;now&nbsp;1-bit&nbsp;only.</tt></dd></dl>

<dl><dt><a name="SecureFixedPoint-__pos__"><strong>__pos__</strong></a>(self)</dt><dd><tt>Unary&nbsp;+.</tt></dd></dl>

<dl><dt><a name="SecureFixedPoint-__pow__"><strong>__pow__</strong></a>(self, other)</dt><dd><tt>Exponentation&nbsp;for&nbsp;public&nbsp;integral&nbsp;exponent.</tt></dd></dl>

<dl><dt><a name="SecureFixedPoint-__radd__"><strong>__radd__</strong></a> = <a href="#SecureFixedPoint-__add__">__add__</a>(self, other)</dt></dl>

<dl><dt><a name="SecureFixedPoint-__rand__"><strong>__rand__</strong></a> = <a href="#SecureFixedPoint-__and__">__and__</a>(self, other)</dt></dl>

<dl><dt><a name="SecureFixedPoint-__rdivmod__"><strong>__rdivmod__</strong></a>(self, other)</dt><dd><tt>Integer&nbsp;division&nbsp;(with&nbsp;reflected&nbsp;arguments).</tt></dd></dl>

<dl><dt><a name="SecureFixedPoint-__rfloordiv__"><strong>__rfloordiv__</strong></a>(self, other)</dt><dd><tt>Integer&nbsp;quotient&nbsp;(with&nbsp;reflected&nbsp;arguments).</tt></dd></dl>

<dl><dt><a name="SecureFixedPoint-__rlshift__"><strong>__rlshift__</strong></a>(self, other)</dt><dd><tt>Left&nbsp;shift&nbsp;(with&nbsp;reflected&nbsp;arguments).</tt></dd></dl>

<dl><dt><a name="SecureFixedPoint-__rmod__"><strong>__rmod__</strong></a>(self, other)</dt><dd><tt>Integer&nbsp;remainder&nbsp;(with&nbsp;reflected&nbsp;arguments).</tt></dd></dl>

<dl><dt><a name="SecureFixedPoint-__rmul__"><strong>__rmul__</strong></a> = <a href="#SecureFixedPoint-__mul__">__mul__</a>(self, other)</dt></dl>

<dl><dt><a name="SecureFixedPoint-__ror__"><strong>__ror__</strong></a> = <a href="#SecureFixedPoint-__or__">__or__</a>(self, other)</dt></dl>

<dl><dt><a name="SecureFixedPoint-__rrshift__"><strong>__rrshift__</strong></a>(self, other)</dt><dd><tt>Right&nbsp;shift&nbsp;(with&nbsp;reflected&nbsp;arguments).</tt></dd></dl>

<dl><dt><a name="SecureFixedPoint-__rshift__"><strong>__rshift__</strong></a>(self, other)</dt><dd><tt>Right&nbsp;shift&nbsp;with&nbsp;public&nbsp;integral&nbsp;offset.</tt></dd></dl>

<dl><dt><a name="SecureFixedPoint-__rsub__"><strong>__rsub__</strong></a>(self, other)</dt><dd><tt>Subtraction&nbsp;(with&nbsp;reflected&nbsp;arguments).</tt></dd></dl>

<dl><dt><a name="SecureFixedPoint-__rtruediv__"><strong>__rtruediv__</strong></a>(self, other)</dt><dd><tt>Division&nbsp;(with&nbsp;reflected&nbsp;arguments).</tt></dd></dl>

<dl><dt><a name="SecureFixedPoint-__rxor__"><strong>__rxor__</strong></a> = <a href="#SecureFixedPoint-__xor__">__xor__</a>(self, other)</dt></dl>

<dl><dt><a name="SecureFixedPoint-__sub__"><strong>__sub__</strong></a>(self, other)</dt><dd><tt>Subtraction.</tt></dd></dl>

<dl><dt><a name="SecureFixedPoint-__truediv__"><strong>__truediv__</strong></a>(self, other)</dt><dd><tt>Division.</tt></dd></dl>

<dl><dt><a name="SecureFixedPoint-__xor__"><strong>__xor__</strong></a>(self, other)</dt><dd><tt>Bitwise&nbsp;exclusive-or,&nbsp;for&nbsp;now&nbsp;1-bit&nbsp;only.</tt></dd></dl>

<hr>
Data descriptors inherited from <a href="mpyc.sectypes.html#Share">Share</a>:<br>
<dl><dt><strong>df</strong></dt>
</dl>
<hr>
Data and other attributes inherited from <a href="mpyc.sectypes.html#Share">Share</a>:<br>
<dl><dt><strong>__hash__</strong> = None</dl>

</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="SecureInteger">class <strong>SecureInteger</strong></a>(<a href="mpyc.sectypes.html#Share">Share</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt><a href="#SecureInteger">SecureInteger</a>(value=None)<br>
&nbsp;<br>
Base&nbsp;class&nbsp;for&nbsp;secret-shared&nbsp;integer&nbsp;values.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="mpyc.sectypes.html#SecureInteger">SecureInteger</a></dd>
<dd><a href="mpyc.sectypes.html#Share">Share</a></dd>
<dd><a href="https://docs.python.org/3/library/functions.html#object">builtins.object</a></dd>
</dl>
<hr>
Methods inherited from <a href="mpyc.sectypes.html#Share">Share</a>:<br>
<dl><dt><a name="SecureInteger-__abs__"><strong>__abs__</strong></a>(self)</dt><dd><tt>Absolute&nbsp;value.</tt></dd></dl>

<dl><dt><a name="SecureInteger-__add__"><strong>__add__</strong></a>(self, other)</dt><dd><tt>Addition.</tt></dd></dl>

<dl><dt><a name="SecureInteger-__and__"><strong>__and__</strong></a>(self, other)</dt><dd><tt>Bitwise&nbsp;and,&nbsp;for&nbsp;now&nbsp;1-bit&nbsp;only.</tt></dd></dl>

<dl><dt><a name="SecureInteger-__bool__"><strong>__bool__</strong></a>(self)</dt><dd><tt>Use&nbsp;of&nbsp;secret-shared&nbsp;values&nbsp;in&nbsp;Boolean&nbsp;expressions&nbsp;makes&nbsp;no&nbsp;sense.</tt></dd></dl>

<dl><dt><a name="SecureInteger-__divmod__"><strong>__divmod__</strong></a>(self, other)</dt><dd><tt>Integer&nbsp;division&nbsp;with&nbsp;public&nbsp;divisor.</tt></dd></dl>

<dl><dt><a name="SecureInteger-__eq__"><strong>__eq__</strong></a>(self, other)</dt><dd><tt>Equality&nbsp;testing.</tt></dd></dl>

<dl><dt><a name="SecureInteger-__floordiv__"><strong>__floordiv__</strong></a>(self, other)</dt><dd><tt>Integer&nbsp;quotient&nbsp;with&nbsp;public&nbsp;divisor.</tt></dd></dl>

<dl><dt><a name="SecureInteger-__ge__"><strong>__ge__</strong></a>(self, other)</dt><dd><tt>Greater-than&nbsp;or&nbsp;equal&nbsp;comparison.</tt></dd></dl>

<dl><dt><a name="SecureInteger-__gt__"><strong>__gt__</strong></a>(self, other)</dt><dd><tt>Strictly&nbsp;greater-than&nbsp;comparison.</tt></dd></dl>

<dl><dt><a name="SecureInteger-__init__"><strong>__init__</strong></a>(self, value=None)</dt><dd><tt>Initialize&nbsp;a&nbsp;share.</tt></dd></dl>

<dl><dt><a name="SecureInteger-__invert__"><strong>__invert__</strong></a>(self)</dt><dd><tt>Bitwise&nbsp;not&nbsp;(inversion),&nbsp;for&nbsp;now&nbsp;1-bit&nbsp;only.</tt></dd></dl>

<dl><dt><a name="SecureInteger-__le__"><strong>__le__</strong></a>(self, other)</dt><dd><tt>Less-than&nbsp;or&nbsp;equal&nbsp;comparison.</tt></dd></dl>

<dl><dt><a name="SecureInteger-__lshift__"><strong>__lshift__</strong></a>(self, other)</dt><dd><tt>Left&nbsp;shift&nbsp;with&nbsp;public&nbsp;integral&nbsp;offset.</tt></dd></dl>

<dl><dt><a name="SecureInteger-__lt__"><strong>__lt__</strong></a>(self, other)</dt><dd><tt>Strictly&nbsp;less-than&nbsp;comparison.</tt></dd></dl>

<dl><dt><a name="SecureInteger-__mod__"><strong>__mod__</strong></a>(self, other)</dt><dd><tt>Integer&nbsp;remainder&nbsp;with&nbsp;public&nbsp;divisor.</tt></dd></dl>

<dl><dt><a name="SecureInteger-__mul__"><strong>__mul__</strong></a>(self, other)</dt><dd><tt>Multiplication.</tt></dd></dl>

<dl><dt><a name="SecureInteger-__ne__"><strong>__ne__</strong></a>(self, other)</dt><dd><tt>Negated&nbsp;equality&nbsp;testing.</tt></dd></dl>

<dl><dt><a name="SecureInteger-__neg__"><strong>__neg__</strong></a>(self)</dt><dd><tt>Negation.</tt></dd></dl>

<dl><dt><a name="SecureInteger-__or__"><strong>__or__</strong></a>(self, other)</dt><dd><tt>Bitwise&nbsp;or,&nbsp;for&nbsp;now&nbsp;1-bit&nbsp;only.</tt></dd></dl>

<dl><dt><a name="SecureInteger-__pos__"><strong>__pos__</strong></a>(self)</dt><dd><tt>Unary&nbsp;+.</tt></dd></dl>

<dl><dt><a name="SecureInteger-__pow__"><strong>__pow__</strong></a>(self, other)</dt><dd><tt>Exponentation&nbsp;for&nbsp;public&nbsp;integral&nbsp;exponent.</tt></dd></dl>

<dl><dt><a name="SecureInteger-__radd__"><strong>__radd__</strong></a> = <a href="#SecureInteger-__add__">__add__</a>(self, other)</dt></dl>

<dl><dt><a name="SecureInteger-__rand__"><strong>__rand__</strong></a> = <a href="#SecureInteger-__and__">__and__</a>(self, other)</dt></dl>

<dl><dt><a name="SecureInteger-__rdivmod__"><strong>__rdivmod__</strong></a>(self, other)</dt><dd><tt>Integer&nbsp;division&nbsp;(with&nbsp;reflected&nbsp;arguments).</tt></dd></dl>

<dl><dt><a name="SecureInteger-__rfloordiv__"><strong>__rfloordiv__</strong></a>(self, other)</dt><dd><tt>Integer&nbsp;quotient&nbsp;(with&nbsp;reflected&nbsp;arguments).</tt></dd></dl>

<dl><dt><a name="SecureInteger-__rlshift__"><strong>__rlshift__</strong></a>(self, other)</dt><dd><tt>Left&nbsp;shift&nbsp;(with&nbsp;reflected&nbsp;arguments).</tt></dd></dl>

<dl><dt><a name="SecureInteger-__rmod__"><strong>__rmod__</strong></a>(self, other)</dt><dd><tt>Integer&nbsp;remainder&nbsp;(with&nbsp;reflected&nbsp;arguments).</tt></dd></dl>

<dl><dt><a name="SecureInteger-__rmul__"><strong>__rmul__</strong></a> = <a href="#SecureInteger-__mul__">__mul__</a>(self, other)</dt></dl>

<dl><dt><a name="SecureInteger-__ror__"><strong>__ror__</strong></a> = <a href="#SecureInteger-__or__">__or__</a>(self, other)</dt></dl>

<dl><dt><a name="SecureInteger-__rrshift__"><strong>__rrshift__</strong></a>(self, other)</dt><dd><tt>Right&nbsp;shift&nbsp;(with&nbsp;reflected&nbsp;arguments).</tt></dd></dl>

<dl><dt><a name="SecureInteger-__rshift__"><strong>__rshift__</strong></a>(self, other)</dt><dd><tt>Right&nbsp;shift&nbsp;with&nbsp;public&nbsp;integral&nbsp;offset.</tt></dd></dl>

<dl><dt><a name="SecureInteger-__rsub__"><strong>__rsub__</strong></a>(self, other)</dt><dd><tt>Subtraction&nbsp;(with&nbsp;reflected&nbsp;arguments).</tt></dd></dl>

<dl><dt><a name="SecureInteger-__rtruediv__"><strong>__rtruediv__</strong></a>(self, other)</dt><dd><tt>Division&nbsp;(with&nbsp;reflected&nbsp;arguments).</tt></dd></dl>

<dl><dt><a name="SecureInteger-__rxor__"><strong>__rxor__</strong></a> = <a href="#SecureInteger-__xor__">__xor__</a>(self, other)</dt></dl>

<dl><dt><a name="SecureInteger-__sub__"><strong>__sub__</strong></a>(self, other)</dt><dd><tt>Subtraction.</tt></dd></dl>

<dl><dt><a name="SecureInteger-__truediv__"><strong>__truediv__</strong></a>(self, other)</dt><dd><tt>Division.</tt></dd></dl>

<dl><dt><a name="SecureInteger-__xor__"><strong>__xor__</strong></a>(self, other)</dt><dd><tt>Bitwise&nbsp;exclusive-or,&nbsp;for&nbsp;now&nbsp;1-bit&nbsp;only.</tt></dd></dl>

<hr>
Data descriptors inherited from <a href="mpyc.sectypes.html#Share">Share</a>:<br>
<dl><dt><strong>df</strong></dt>
</dl>
<hr>
Data and other attributes inherited from <a href="mpyc.sectypes.html#Share">Share</a>:<br>
<dl><dt><strong>__hash__</strong> = None</dl>

</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="Share">class <strong>Share</strong></a>(<a href="https://docs.python.org/3/library/functions.html#object">builtins.object</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt><a href="#Share">Share</a>(value=None)<br>
&nbsp;<br>
A&nbsp;secret-shared&nbsp;value.<br>
&nbsp;<br>
An&nbsp;MPC&nbsp;protocol&nbsp;operates&nbsp;on&nbsp;secret-shared&nbsp;values,&nbsp;represented&nbsp;by&nbsp;<a href="#Share">Share</a><br>
objects.&nbsp;The&nbsp;basic&nbsp;Python&nbsp;operators&nbsp;are&nbsp;overloaded&nbsp;for&nbsp;<a href="#Share">Share</a>&nbsp;objects.<br>
An&nbsp;expression&nbsp;like&nbsp;a&nbsp;*&nbsp;b&nbsp;will&nbsp;create&nbsp;a&nbsp;new&nbsp;<a href="#Share">Share</a>&nbsp;<a href="https://docs.python.org/3/library/functions.html#object">object</a>,&nbsp;which&nbsp;will<br>
eventually&nbsp;contain&nbsp;the&nbsp;product&nbsp;of&nbsp;a&nbsp;and&nbsp;b.&nbsp;The&nbsp;product&nbsp;is&nbsp;computed<br>
asynchronously,&nbsp;using&nbsp;an&nbsp;instance&nbsp;of&nbsp;a&nbsp;specific&nbsp;cryptographic&nbsp;protocol.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="Share-__abs__"><strong>__abs__</strong></a>(self)</dt><dd><tt>Absolute&nbsp;value.</tt></dd></dl>

<dl><dt><a name="Share-__add__"><strong>__add__</strong></a>(self, other)</dt><dd><tt>Addition.</tt></dd></dl>

<dl><dt><a name="Share-__and__"><strong>__and__</strong></a>(self, other)</dt><dd><tt>Bitwise&nbsp;and,&nbsp;for&nbsp;now&nbsp;1-bit&nbsp;only.</tt></dd></dl>

<dl><dt><a name="Share-__bool__"><strong>__bool__</strong></a>(self)</dt><dd><tt>Use&nbsp;of&nbsp;secret-shared&nbsp;values&nbsp;in&nbsp;Boolean&nbsp;expressions&nbsp;makes&nbsp;no&nbsp;sense.</tt></dd></dl>

<dl><dt><a name="Share-__divmod__"><strong>__divmod__</strong></a>(self, other)</dt><dd><tt>Integer&nbsp;division&nbsp;with&nbsp;public&nbsp;divisor.</tt></dd></dl>

<dl><dt><a name="Share-__eq__"><strong>__eq__</strong></a>(self, other)</dt><dd><tt>Equality&nbsp;testing.</tt></dd></dl>

<dl><dt><a name="Share-__floordiv__"><strong>__floordiv__</strong></a>(self, other)</dt><dd><tt>Integer&nbsp;quotient&nbsp;with&nbsp;public&nbsp;divisor.</tt></dd></dl>

<dl><dt><a name="Share-__ge__"><strong>__ge__</strong></a>(self, other)</dt><dd><tt>Greater-than&nbsp;or&nbsp;equal&nbsp;comparison.</tt></dd></dl>

<dl><dt><a name="Share-__gt__"><strong>__gt__</strong></a>(self, other)</dt><dd><tt>Strictly&nbsp;greater-than&nbsp;comparison.</tt></dd></dl>

<dl><dt><a name="Share-__init__"><strong>__init__</strong></a>(self, value=None)</dt><dd><tt>Initialize&nbsp;a&nbsp;share.</tt></dd></dl>

<dl><dt><a name="Share-__invert__"><strong>__invert__</strong></a>(self)</dt><dd><tt>Bitwise&nbsp;not&nbsp;(inversion),&nbsp;for&nbsp;now&nbsp;1-bit&nbsp;only.</tt></dd></dl>

<dl><dt><a name="Share-__le__"><strong>__le__</strong></a>(self, other)</dt><dd><tt>Less-than&nbsp;or&nbsp;equal&nbsp;comparison.</tt></dd></dl>

<dl><dt><a name="Share-__lshift__"><strong>__lshift__</strong></a>(self, other)</dt><dd><tt>Left&nbsp;shift&nbsp;with&nbsp;public&nbsp;integral&nbsp;offset.</tt></dd></dl>

<dl><dt><a name="Share-__lt__"><strong>__lt__</strong></a>(self, other)</dt><dd><tt>Strictly&nbsp;less-than&nbsp;comparison.</tt></dd></dl>

<dl><dt><a name="Share-__mod__"><strong>__mod__</strong></a>(self, other)</dt><dd><tt>Integer&nbsp;remainder&nbsp;with&nbsp;public&nbsp;divisor.</tt></dd></dl>

<dl><dt><a name="Share-__mul__"><strong>__mul__</strong></a>(self, other)</dt><dd><tt>Multiplication.</tt></dd></dl>

<dl><dt><a name="Share-__ne__"><strong>__ne__</strong></a>(self, other)</dt><dd><tt>Negated&nbsp;equality&nbsp;testing.</tt></dd></dl>

<dl><dt><a name="Share-__neg__"><strong>__neg__</strong></a>(self)</dt><dd><tt>Negation.</tt></dd></dl>

<dl><dt><a name="Share-__or__"><strong>__or__</strong></a>(self, other)</dt><dd><tt>Bitwise&nbsp;or,&nbsp;for&nbsp;now&nbsp;1-bit&nbsp;only.</tt></dd></dl>

<dl><dt><a name="Share-__pos__"><strong>__pos__</strong></a>(self)</dt><dd><tt>Unary&nbsp;+.</tt></dd></dl>

<dl><dt><a name="Share-__pow__"><strong>__pow__</strong></a>(self, other)</dt><dd><tt>Exponentation&nbsp;for&nbsp;public&nbsp;integral&nbsp;exponent.</tt></dd></dl>

<dl><dt><a name="Share-__radd__"><strong>__radd__</strong></a> = <a href="#Share-__add__">__add__</a>(self, other)</dt></dl>

<dl><dt><a name="Share-__rand__"><strong>__rand__</strong></a> = <a href="#Share-__and__">__and__</a>(self, other)</dt></dl>

<dl><dt><a name="Share-__rdivmod__"><strong>__rdivmod__</strong></a>(self, other)</dt><dd><tt>Integer&nbsp;division&nbsp;(with&nbsp;reflected&nbsp;arguments).</tt></dd></dl>

<dl><dt><a name="Share-__rfloordiv__"><strong>__rfloordiv__</strong></a>(self, other)</dt><dd><tt>Integer&nbsp;quotient&nbsp;(with&nbsp;reflected&nbsp;arguments).</tt></dd></dl>

<dl><dt><a name="Share-__rlshift__"><strong>__rlshift__</strong></a>(self, other)</dt><dd><tt>Left&nbsp;shift&nbsp;(with&nbsp;reflected&nbsp;arguments).</tt></dd></dl>

<dl><dt><a name="Share-__rmod__"><strong>__rmod__</strong></a>(self, other)</dt><dd><tt>Integer&nbsp;remainder&nbsp;(with&nbsp;reflected&nbsp;arguments).</tt></dd></dl>

<dl><dt><a name="Share-__rmul__"><strong>__rmul__</strong></a> = <a href="#Share-__mul__">__mul__</a>(self, other)</dt></dl>

<dl><dt><a name="Share-__ror__"><strong>__ror__</strong></a> = <a href="#Share-__or__">__or__</a>(self, other)</dt></dl>

<dl><dt><a name="Share-__rrshift__"><strong>__rrshift__</strong></a>(self, other)</dt><dd><tt>Right&nbsp;shift&nbsp;(with&nbsp;reflected&nbsp;arguments).</tt></dd></dl>

<dl><dt><a name="Share-__rshift__"><strong>__rshift__</strong></a>(self, other)</dt><dd><tt>Right&nbsp;shift&nbsp;with&nbsp;public&nbsp;integral&nbsp;offset.</tt></dd></dl>

<dl><dt><a name="Share-__rsub__"><strong>__rsub__</strong></a>(self, other)</dt><dd><tt>Subtraction&nbsp;(with&nbsp;reflected&nbsp;arguments).</tt></dd></dl>

<dl><dt><a name="Share-__rtruediv__"><strong>__rtruediv__</strong></a>(self, other)</dt><dd><tt>Division&nbsp;(with&nbsp;reflected&nbsp;arguments).</tt></dd></dl>

<dl><dt><a name="Share-__rxor__"><strong>__rxor__</strong></a> = <a href="#Share-__xor__">__xor__</a>(self, other)</dt></dl>

<dl><dt><a name="Share-__sub__"><strong>__sub__</strong></a>(self, other)</dt><dd><tt>Subtraction.</tt></dd></dl>

<dl><dt><a name="Share-__truediv__"><strong>__truediv__</strong></a>(self, other)</dt><dd><tt>Division.</tt></dd></dl>

<dl><dt><a name="Share-__xor__"><strong>__xor__</strong></a>(self, other)</dt><dd><tt>Bitwise&nbsp;exclusive-or,&nbsp;for&nbsp;now&nbsp;1-bit&nbsp;only.</tt></dd></dl>

<hr>
Data descriptors defined here:<br>
<dl><dt><strong>df</strong></dt>
</dl>
<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>__hash__</strong> = None</dl>

</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#eeaa77">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
    
<tr><td bgcolor="#eeaa77"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl><dt><a name="-SecFld"><strong>SecFld</strong></a>(order=None, modulus=None, char=None, ext_deg=None, min_order=None, signed=False)</dt><dd><tt>Secure&nbsp;finite&nbsp;field&nbsp;of&nbsp;order&nbsp;q&nbsp;=&nbsp;p**d.<br>
&nbsp;<br>
Order&nbsp;q&nbsp;&gt;=&nbsp;min_order.<br>
Field&nbsp;is&nbsp;prime&nbsp;(d&nbsp;=&nbsp;1)&nbsp;by&nbsp;default&nbsp;and&nbsp;if&nbsp;modulus&nbsp;is&nbsp;prime.<br>
Extension&nbsp;degree&nbsp;d&nbsp;&gt;&nbsp;1&nbsp;if&nbsp;order&nbsp;is&nbsp;a&nbsp;prime&nbsp;power&nbsp;p**d&nbsp;with&nbsp;d&nbsp;&gt;&nbsp;1,<br>
if&nbsp;modulus&nbsp;is&nbsp;a&nbsp;polynomial&nbsp;or&nbsp;a&nbsp;string&nbsp;or&nbsp;an&nbsp;integer&nbsp;&gt;&nbsp;char,<br>
or&nbsp;if&nbsp;ext_deg&nbsp;is&nbsp;an&nbsp;integer&nbsp;&gt;&nbsp;1,&nbsp;or&nbsp;if&nbsp;min_order&nbsp;&gt;&nbsp;char.</tt></dd></dl>
 <dl><dt><a name="-SecFxp"><strong>SecFxp</strong></a>(l=None, f=None, p=None, n=2)</dt><dd><tt>Secure&nbsp;l-bit&nbsp;fixed-point&nbsp;numbers&nbsp;with&nbsp;f-bit&nbsp;fractional&nbsp;part.<br>
&nbsp;<br>
NB:&nbsp;if&nbsp;dividing&nbsp;secure&nbsp;fixed-point&nbsp;numbers,&nbsp;make&nbsp;sure&nbsp;that&nbsp;l&nbsp;=~&nbsp;2f.</tt></dd></dl>
 <dl><dt><a name="-SecInt"><strong>SecInt</strong></a>(l=None, p=None, n=2)</dt><dd><tt>Secure&nbsp;l-bit&nbsp;integers.</tt></dd></dl>
</td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
    
<tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><strong>runtime</strong> = None</td></tr></table>
</body></html>